<template>
	<div class="coverbox">
		<img class="cover" :src="url" />
	</div>
</template>

<script>
	import axios from 'axios'
	export default {
		name: 'testUrl',
		data() {
			return {
				url: "",
				headers: {
					token: window.sessionStorage.getItem('token')
				},
				filePath:"/\\2022-07-20\\1366784700227900.png",
				fileName:"",
			}
		},
		mounted() {
			let params = {
				filePath: this.filePath,
				fileName: this.fileName
			}
			axios({
				method: 'post',
				url: '/member-security/file/fileDownloadCommon',
				headers: this.headers,
				data: params,
				responseType: 'blob'
			}).then(res => {
				if (!res.data) {
					return "";
				}
				this.url = window.URL.createObjectURL(new Blob([res.data]));
			})
		},
		methods: {
			
		}
	}
</script>

<style>
</style>
